package gov.child.dao;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.hibernate.Session;
import org.hibernate.SessionException;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate5.support.HibernateDaoSupport;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author fzh
 * @since 2017/9/9
 */
@Component
public class AbstractDao extends HibernateDaoSupport {

    protected static Logger logger = LogManager.getLogger(AbstractDao.class);

    @Resource(name = "sessionFactory",type = SessionFactory.class)
    public void setSuperSessionFactory(SessionFactory superSessionFactory){
        super.setSessionFactory(superSessionFactory);
    }
}
